package _01_动态数组.binaryHeap;

import _01_动态数组.binaryHeap.Heap;

import java.util.Comparator;

public abstract class AbstractHeap implements Heap {

    protected int size;

    protected static final int DEFAULT_CAPACITY = 10;

    protected Comparator<Integer> comparator;

    public AbstractHeap() {
        this(null);
    }

    public AbstractHeap(Comparator<Integer> comparator) {
        this.comparator = comparator;
    }

    @Override
    public int size() {
        return size;
    }

    @Override
    public boolean isEmpty() {
        return size == 0;
    }
}
